<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>登录</title>
    <style>.error{color:red;}</style>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.2.1.min.js"></script>
    <script type="text/javascript">
    function login (){
    	var userName = $(".userName").val();
    	var passWord = $(".passWord").val();
    	$.ajax({
    		   type: "POST",
    		   url: "http://localhost:8080/EN/user/regist?userName="+userName+"&passWord="+passWord,
    		   success: function(msg){
    		     alert( "Data Saved: " + msg );
    		   }
    		});
    }

    </script>
</head>
<body>

<div class="error">${error}</div>

    用户名：<input type="text" class="userName"><br/>
    密码：<input type="password" class="passWord"><br/>
    <div class="login" onClick="login()">登陆</div>

</body>
</html>